package com.sz.designpattern.behavior11.interpreter;

/**
 * 终结符表达式
 */
public class NumExpression extends ArithmeticExpression{
    private String num;

    public NumExpression(String num) {
        this.num = num;
    }

    @Override
    protected Object interpret(Context context) {
        return Integer.parseInt(num);
    }
}
